<template>
  <div>
      sss
      <table>
          <tr v-for="i in novellist" :key="i.id">
              <td>{{i.title}}</td>
              <van-button @click="auditpass(i.id)">通过</van-button>
          </tr>
      </table>
  </div>
</template>
<script>
import myaxios from '../components/http/axios' 
export default {
    data(){
        return{
            novellist:[]
        }
    },
    methods:{
        getaudit(){
            myaxios('getauditnovel','get').then(res=>{
                console.log(res);
                this.novellist = res.list
                console.log(this.novellist);
            })
        },
        auditpass(id){
            myaxios('auditnovel','post',{'id':id,'userid':localStorage.getItem('userid')}).then(res=>{
                console.log(res);
            })
        }
    },
    mounted(){
        this.getaudit()
    }
}
</script>

<style>

</style>